Notebook: Don’t show raw underline/markup in popup
authorDaniel Boles <dboles@src.gnome.org>
Fri, 16 Mar 2018 22:11:58 +0000 (22:11 +0000)
committerDaniel Boles <dboles@src.gnome.org>
Fri, 16 Mar 2018 22:34:05 +0000 (22:34 +0000)
commit146082d4645ed7a7b0abe437947480b215ed5c5a
tree7a9d34a470ede1ca7aa5c6d1f8603ec96fe4c1e3
parentb64a4031006e29a9e54bccf85ff4a82251507307
Notebook: Don’t show raw underline/markup in popup

If @menu_label == NULL, we create a default page->menu_label. This took
@tab_label.get_label() and passed that to page->menu_label.set_text().
This is wrong because we set the plain text of the menu_label from the
rich text of @tab_label. So, if @tab_label used mnemonics or markup, our
menu_label got the raw underline or markup tags shown in it as raw text.

As we call set_text() on the menu Label, the fix is to be symmetric: use
@tab_label’s get_text() as source, as that strips underlines and markup.

It’s not worth making the default Label ‘inherit’ :use-underline/markup;
that’s a slippery slope, and users wanting such things can just create a
fully fledged GtkLabel to pass as @menu_label to suppress the default.

https://bugzilla.gnome.org/show_bug.cgi?id=705509
gtk/gtknotebook.c